package io.esirong.base;

import androidx.annotation.NonNull;
import androidx.annotation.StringRes;

/**
 * Context代理接口定义
 * <P>*要求* 定义的接口里入参出参不得含有平台相关的代码，意在解耦平台代码
 */
public interface ContextX {

    @NonNull
    String getString(@StringRes int resId);

    /**
     * Returns a localized formatted string from the application's package's
     * default string table, substituting the format arguments as defined in
     * {@link java.util.Formatter} and {@link java.lang.String#format}.
     *
     * @param resId      Resource id for the format string
     * @param formatArgs The format arguments that will be used for
     *                   substitution.
     * @return The string data associated with the resource, formatted and
     * stripped of styled text information.
     */
    @NonNull
    String getString(@StringRes int resId, Object... formatArgs);
}
